<extend name="Public/Common/base.html" />
<block name="main">
<css href="__PUBLIC__/assets/css/tp.css" />
 <js href="__PUBLIC__/assets/js/jquery.min.js" /> 
 <js href="__PUBLIC__/layer/layer.js" />
 <js href="__PUBLIC__/assets/js/app.js" />
<style>
.am-table{
	font-size:13px;
}
</style>
<div class="am-g">
<form class="am-form">
		<div class="am-form-group am-u-sm-6 am-u-end">
			<label for="doc-select-1">选择月份:</label> <select id="getid"
				name="getid" required onchange="selectqj()">
				<option value="{$month}" selected>{$month}月</option>
				<volist name="monthlist" id="vo">
				<option value="{$vo.id}">{$vo.month}月</option>
				</volist>
			</select> <span class="am-form-caret"></span> <input id="tex" type="hidden"
				name="tex" value="">
		</div>
	</form>
	<form class="am-form">
		<div class="am-u-sm-6 am-u-end">
			<label for="doc-select-1">收搜关键词:</label>
			<div class="am-input-group">
				<input type="text" id="search" name="search" class="am-form-field"
					placeholder="请输入姓名"
					onkeyup="this.value=this.value.replace(/[, ]/g,'')"> 
					<span class="am-input-group-btn" onclick="searchqj()">
					<button class="am-btn am-btn-default">
						<span class="am-icon-search"></span>
					</button>
				</span>
			</div>
		</div>
	</form>
</div>
<table class="am-table am-table-compact am-table-centered am-scrollable-horizontal   am-table-bordered">
    <thead>
       <tr>
           <th  colspan="6">
			{$year}年{$month}月
			</th>
			<th  colspan="1">
			 <button class="am-btn am-btn-danger am-btn-xs" onclick="qjgl()">批量删除</button>
			</th>
           
        </tr>
        <tr>
            <th><input type="checkbox" id="selectall" value=""></th>
            <th>id</th>
            <th>姓名</th>
            <th>请假月份</th>
            <th>请假时间</th>
            <th>请假天数</th>         
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
    <if condition="$leavelist EQ $null">
	   <tr >
	    <td colspan="7">
		<span style="color:red;">暂无请假记录</span>	
		<td>
	   </tr> 	
    <else/>
    <volist name="leavelist" id="vo">   
        <tr>
        <td><input type="checkbox" name="select[]" class="cq" value="{$vo.id}">
		</td>
            <td>{$i}</td>
            <td>{$vo.leaveuser}</td>
            <td>{$vo.mid}</td>
            <td>{$vo.leavetime}</td>        
            <td>{$vo.leavedate}</td>                   
            <td>
           <a href="{:U('Leave/edit?id='.$vo['id'])}">
            <button class="am-btn am-btn-primary am-btn-xs ">编辑</button>
            </a>
            
            </td>
        </tr>     
       </volist>
       </if>
    </tbody>
</table>
		
	<div class="am-g">
       <a href="{:U('Leave/add')}">
           <button class="am-btn am-btn-primary am-btn-sm ">{$info}</button>
        </a>
	</div>
 
<div class="am-g am-text-center">
      {$page}
	</div>
    <js href="__PUBLIC__/assets/js/jquery14.js" /> 
<script type="text/javascript"> 
$(function(){ 
$("#selectall").click(function() { 
 var flag = $(this).attr("checked"); 					
  $("[name=select[]]:checkbox").each(function(){
	  $(this).attr("checked", flag);
	  });
});	 
});	

</script>    
      
</block>
